<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Advanced.aspx.cs" Inherits="DNJPanel_Advanced" %>

<%@ Register Assembly="Org.Eurekaa.DNJ" Namespace="Org.Eurekaa.DNJ.WebControls" TagPrefix="dnj" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>DNJ Panel Demo (Custom)</title>
  
    <script type="text/javascript" src="../dnj/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../dnj/js/jquery.nyroModal-1.5.0.min.js"></script>
    <script type="text/javascript" src="../dnj/config/DNJResources.axd?conf=jsonmap.config"></script>    
    
    
    <style type="text/css">

    .dnj-indicator
    {
        border:0px;
        background: #a00;
        color:#fff;
        position:absolute;
        top:0px;
        right:0px;
        width:150px;
        font:700 11px verdana;
        padding:2px 5px;
    }
    
    </style>      
	<script type="text/javascript">   
        $(document).ready(function() {    
        
        //Creating a custom ajax indicator (this will mimic the GMail "loading" indicator)
        var indicator = $('<div>Loading</div>').addClass('dnj-indicator').hide();
        $('body').append(indicator);
        $(window).scroll(function() {
            indicator.css('top', $(this).scrollTop() + "px");
        });                                         


	    // Custom DNJ Panel initialisation	    
	    // The example bellow shows how we can add some visual effects for loading, waiting, errors ...etc
	    //        
        $.DNJ({
            errorCallBack : function(msg) {
                    $.nyroModalManual({
                      bgColor: '#ffaaaa',
                      title: 'An error has occured',
                      content: msg
                    });            
                },         
            beforeCallBack : function(sender)
                {
                    indicator.show();
                    sender.fadeTo("fast", 0.50);
                }, 
            afterCallBack : function(sender)
                {
                    indicator.hide();
                    sender.fadeTo("fast", 1.00);                    
                }
        }); 
        
        
   });     
	</script>      

    <link href="../dnj/css/nyroModal.full.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td valign="top">
        <h2>The following controls will not cause a postback </h2>
            <dnj:DNJPanel ID="DNJPanel1" runat="server" Width="488px">
            
                <asp:Button ID="Button1" runat="server" Text="Button " OnClick="Button1_Click" />&nbsp;
                <br />
                <br />
                <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><br />
                <br />
                <asp:TextBox ID="TextBox1" runat="server">Eurekaa !</asp:TextBox>
                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Say it" /><br />
                <br />
                <br />
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="Throw an error" />
            </dnj:DNJPanel>
            <hr />
        <h2>The following controls will <u>cause</u> a postback </h2>
            <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="PostBack button" /><br />
            <br />
            <br />
            &nbsp;
    
    </td>
    <td valign="top">
        <dnj:DNJPanel ID="DNJPanel2" runat="server" Width="495px">
            <asp:Label ID="LblLog" runat="server"></asp:Label>
        </dnj:DNJPanel>
    
    </td>
    </tr>
    </table>
     </div>
    </form>
</body>
</html>
